/*
 * @Author: sunzhijun 
 * @Date: 2019-08-17 14:28:30 
 * @Last Modified by: sunzhijun
 * @Last Modified time: 2019-11-27 19:40:03
 */

import React from 'react';
import { render } from 'src/hrpub/common/frame';
import { base } from 'nc-lightapp-front';
import './index.less';
const DieModal = render({

})(({ props, state}) => {
   const { NCModal, NCButton, NCDatePicker } = base;
   const { main, form, action } = props;
   const { language } = main;
   return(
       <React.Fragment>
           <NCModal
               show={ main.dieModalVisible }
               size="lg"
               className="die-modal"
               onHide={ action.headerAct.hiddenModal }
               // onEntered={this.showHandle}
               backdrop="static"
           >
               <NCModal.Header
                   closeButton={true}
               >
                   {/*  国际化处理： 身故处理 */}
                   {language['hi6007-000159']} 
               </NCModal.Header>
               <NCModal.Body>
                   <div className="data-picker-con">
                       {
                           form.createForm('passaway',{
                                onBeforeEvent: action.headerAct.dieBeforeEvent
                           })
                       }
                       {/* <div className="date-picker-title">
                           终止日期
                       </div>
                       <div className="date-picker">
                           <NCDatePicker value={main.defaultTime} onChange={ action.terminationAct.changeTime } />
                       </div> */}
                   </div>
               </NCModal.Body>
               <NCModal.Footer>
                   <NCButton
                       colors="primary"
                       onClick={ action.headerAct.dieAction }
                   >
                       {/* 国际化处理： 确认 */}
                       {language['hi6007-000174']}
                   </NCButton>
                   <NCButton
                       colors="secondary"
                       onClick={ action.headerAct.hiddenModal }
                   >
                       {/* 国际化处理： 取消 */}
                       {language['hi6007-000005']}
                   </NCButton>
               </NCModal.Footer>
           </NCModal>
       </React.Fragment>
   )
})

export default DieModal;